//
//  JNavigationController.m
//  DoctorFAQs
//
//  Created by zjq on 17/2/9.
//  Copyright © 2017年 zjq. All rights reserved.
//

#import "JNavigationController.h"
#import "UIImage+RadiusAndColor.h"
@interface JNavigationController ()<UIGestureRecognizerDelegate>

@end

@implementation JNavigationController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self loadTheNavBar];
}

- (void)loadTheNavBar {
    [self.navigationBar setTranslucent:NO];//是否半透明
    [self.navigationBar setBarTintColor:[UIColor whiteColor]];
    [self.navigationBar setTintColor:[UIColor blackColor]];
    [self.navigationBar setBackgroundImage:[[UIImage alloc]imageWithColor:[UIColor whiteColor]] forBarMetrics:UIBarMetricsDefault];
    [self.navigationBar setShadowImage:[UIImage new]];//下边的小黑边
    // 设置阴影颜色 1.设置颜色，2设置阴影偏移范围3，设置阴影颜色的透明度4设置阴影半径5设置路径通常只需设置123步即可完成
//    self.navigationBar.layer.shadowColor = [UIColor blackColor].CGColor;
//    self.navigationBar.layer.shadowOffset = CGSizeMake(0, 10);
//    self.navigationBar.layer.shadowOpacity = 0.2;
//    self.navigationBar.layer.shadowRadius = 16;
//    self.navigationBar.layer.shadowPath = [UIBezierPath bezierPathWithRect:self.navigationBar.bounds].CGPath;
    
    [[UIBarButtonItem appearance] setBackButtonTitlePositionAdjustment:UIOffsetMake(0, -60) forBarMetrics:UIBarMetricsDefault];
    
}

// 设置非根控制器时隐藏tabbar
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated {
    if (self.viewControllers.count > 0) {
        viewController.hidesBottomBarWhenPushed = YES;
    }
    [super pushViewController:viewController animated:YES];
    
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    
}



@end
